package com.wolves.career.controller;


import com.wolves.career.service.IndustryInformationClassificationService;
import com.wolves.career.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 麦翔盛
 * @since 2021-10-20
 */
@RestController
@CrossOrigin
@RequestMapping("/classification")
public class IndustryInformationClassificationController {
    @Autowired
    private IndustryInformationClassificationService classificationService;

    /**
     * 从excel中导入分裂
     * @param file
     * @return
     */
    @PostMapping("/addClassification")
    public R importClassificationData(MultipartFile file){
        classificationService.importClassificationData(file,classificationService);
        return R.ok();
    }
}

